﻿using Newtonsoft.Json.Linq;
using Tools.Extensions;


namespace Entity.Service
{
    public class ResultModel
    {
        public ResultModel() { }

        public ResultModel(ResultType type, string msg = null, JObject data = null)
        {
            Code = type;
            Message = msg ?? type.ToDescription();
            Data = data;
        }

        /// <summary>
        /// 返回代码
        /// </summary>
        public ResultType Code { get; set; }

        /// <summary>
        /// 代码说明
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 数据
        /// </summary>
        public JObject Data { get; set; }
    }
}
